<?php

class HTech_Controller_Action_Helper_Grid extends Zend_Controller_Action_Helper_Abstract
{
    public function validateOptions($opt)
    {
        $options = array();
        $resources = Zend_Auth::getInstance()->getIdentity()->resources;
        foreach($opt as $action) {
            if ($resources[sprintf('%s.%s.%s',$this->getRequest()->module,$this->getRequest()->controller,$action)]) {
                $options[$action] = true; 
            }
        }
        return $options;
    }
}
